/**
 * @Author lilinjie
 * @Description: 品牌API
 */
import http from '@/utils/request'

// 获得全部品牌
export const getAllBrands = ({ current: pageNum, pageSize }) => http({
  method: 'GET',
  url: `/admin/brand/getBrandList/${pageNum}/${pageSize}`
})

// 更新品牌信息
export const updateBrand = (data) => http({
  method: 'PUT',
  url: `/admin/brand/updateById`,
  data
})

// 插入品牌
export const insertBrand = (data) => http({
  method: 'POST',
  url: `/admin/brand/save`,
  data
})

// 根据ID查询品牌信息
export const getBrandById = ({ brandId }) => http({
  method: 'GET',
  url: `/admin/brand/getBrandById/${brandId}`
})

// 根据ID删除品牌
export const deleteBrandById = (id) => http({
  method: 'DELETE',
  url: `/admin/brand/deleteById/${id}`
})
